Function: Counts the size of the disk space that the directory (or file) occupies.
Syntax: du [options] [files or directories]
Parameters:
-S: Only the total number of blocks of data used for each names parameter is given.-A: Recursively displays
1. Df-lh
2. Du-s/usr/* | Sort-rn
This is sorted by byte
3. du-sh/usr/* | Sort-rn
This is sorted by megabytes (M)
4. Select 10 of the preceding
Du-s/usr/* | Sort-rn | Head
5. Select the following 10
Du-s/usr/* | Sort-rn | TailDu-h–-max-depth=0
1. Df-lh
2. Du-s/usr/* | Sort-rn
This is sorted by byte
3. du-sh/usr/* | Sort-rn
This is sorted by megabytes (M)
4. Select 10 of the preceding
Du-s/usr/* | Sort-rn | Head
5. Select the following 10
Du-s/usr/* | Sort-rn | Tail
Vi. Linux/UNIX operating command accumulation [kill, netstat, df, du], netstatduIn Linux/UNIX, users often use the text interface to set the system or operating system. The author is constantly in touch with this command during his work, therefore,
UseStatistics file or directory occupies hard disk space sizeUsagedu [OPTION] [FILE]Du [OPTION]--files0-from=fCommon parameters-A,--allCount all files, not just directories-B,--bytesBytes in units of statistics-C,--totalTotal output
Experience of using DF, DU, fdisk:linux Disk Management kickDisk is a very important resource in Linux system, how to effectively manage it directly affects the performance of the whole system. In commonly used commands, DF is used to check file
DF: English name disk free, check the use of the hard disk. Du: English name disk usage, view the file size of the specified directory.1. Command formatdf[选项][文件]du[选项][文件]2. DF Common Options"df -a" 全部文件系统列表。"df -h" 人性化显示文件大小,如100K212G等。"df
1. Preface
In embedded devices, hard disk space is very limited, when it comes to the process of often write log, you need to consider the size of the log and delete, or soon the hard disk is full, causing the log program crashes. In order to
Linux disk management commands and usage examples, linux disk command examplesLinux disk management
Linux disk management is directly related to the performance of the entire system.
Linux disk management commonly uses three commands: df, du, and
1. detailed usage of the du command
Common commands: [B] du [/B]-
Query the disk space used by an archive or directory
A: displays the disk space occupied by all directories and each file in the second directory.
B: The size is represented
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.